﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Forgetpwd.aspx.cs" Inherits="SBACN.WebSite.Forgetpwd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
	<script type="text/javascript">
		function getimgcode() {
			var randomnum = Math.random();
			var getimagecode = document.getElementById("getcode");
			getimagecode.src = "ValidationImage.aspx?sn=Complain&" + randomnum;
		}
		function Check() {
			var userName = $jqy.trim(document.getElementById("<%= Username.ClientID%>").value);
			var Email = $jqy.trim(document.getElementById("<%= Email.ClientID%>").value);
			var Valid = $jqy.trim(document.getElementById("<%= txt_valid.ClientID%>").value);

			document.getElementById("<%= UMsg.ClientID%>").innerHTML = "";
			document.getElementById("<%= EMsg.ClientID%>").innerHTML = "";
			document.getElementById("<%= lblValid.ClientID%>").innerHTML = "";

			if (Valid.length < 4) {
				document.getElementById("<%= lblValid.ClientID%>").innerHTML = "请输入正确的验证码!";
				return false;
			}
			if (userName.length == 0) {
				document.getElementById("<%= UMsg.ClientID%>").innerHTML = "请输入用户名!";
				return false;
			}
			if (Email.length == 0) {
				document.getElementById("<%= EMsg.ClientID%>").innerHTML = "请输入邮箱!";
				return false;
			}
			return true;
		}
		function CloseThisWin() {
			if (window.opener) {
				window.opener = null;
			}
			window.close();
			return false;
		}

		function DoLogin(e) {
			e = window.event || e;
			var key = e.keyCode || e.which;
			if (key == 13) {
				document.getElementById("<%= btn_Save.ClientID%>").click();
			}
		}
	</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
	<!--主内容区-->
	<div id="wrapper">
		<div id="nav" runat="server" clientidmode="Static">
			当前位置：<a href="/Index.aspx">首页</a> > 忘记密码
		</div>
		<div id="forget_pw">
			<div id="mainlogin_title">
				<img src="/images/forget_pwtitle.png" width="233" alt="" height="89" /></div>
			<div id="mainzone">
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="10">
					<tr>
						<td width="28%" align="right" class="mainlogin_font">
							<font color="#FF0000">*</font>用户名：
						</td>
						<td width="72%">
							<asp:TextBox name="Username" ID="Username" runat="server" CssClass="input_main" MaxLength="50"
								Width="230px"></asp:TextBox>
							<asp:Label ID="UMsg" runat="server" ForeColor="Red"></asp:Label>
						</td>
					</tr>
					<tr>
						<td align="right" class="mainlogin_font">
							<font color="#FF0000">*</font>邮箱：
						</td>
						<td>
							<asp:TextBox name="Email" ID="Email" runat="server" CssClass="input_main" MaxLength="50"
								Width="230px"></asp:TextBox>
							<asp:Label runat="server" ID="EMsg" ForeColor="Red"></asp:Label>
						</td>
					</tr>
					<tr>
						<td align="right" class="mainlogin_font">
							<font color="#FF0000">*</font>验证码：
						</td>
						<td align="left">
							<asp:TextBox name="txt_valid" ID="txt_valid" runat="server" CssClass="input_main"
								MaxLength="4" Width="60" ></asp:TextBox>
							<img id="getcode" alt="" src="ValidationImage.aspx?sn=Complain" style="vertical-align: middle;">&nbsp;&nbsp;<a
								href="javascript:getimgcode()">刷新验证码</a>
							<asp:Label ID="lblValid" runat="server" ForeColor="Red"></asp:Label>
						</td>
					</tr>
					<tr>
						<td align="center">
							&nbsp;
						</td>
						<td align="left" style="padding-left:20px">
							<table width="100%" border="0" cellspacing="2" cellpadding="0">
								<tr>
									<td>
										<asp:Button runat="server" ID="btn_Save" Text="确定" CssClass="btnmainlogin" OnClick="btn_Save_Click" OnClientClick=" return Check()" />
										<input type="button" value="取消" class="btnmainlogin" onclick="return CloseThisWin();" />
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
	<div style="clear: both;">
	</div>
	<!--主内容区-->
</asp:Content>
